<template>
  <div>
    <router-link to="/one" tag="button">One</router-link>
    <router-link to="/two" tag="button">Two</router-link>
    <transition name="huazai">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
.box {
  width: 300px;
  height: 300px;
  background-color: skyblue;
}
.huazai-enter,
.huazai-enter-active {
  transition: all 2s linear;
}
.huazai-enter-active {
  transition: all 2s linear;
}
.huazai-leave-active {
  transition: all 2s linear;
  position: absolute;
}
</style>